<template>
    <div>
        <com-heard></com-heard>
        <div class="pu-con">
            <div class="gy-cons">
                <gy-com-left
                    :leftTitle="leftTitle"
                    @onLeftTab="onLeftTab"
                    :navList="navList"
                    :curIndex="curIndex"
                />
                <div class="gy-r">
                    <div class="gy-r-1">
                        <p>{{ leftTitle1 }}</p>
                    </div>
                    <!-- <zgxzm-right v-if="curIndex > 0" :param="param" /> -->
                    <cxdw-right :param="param" />
                    <!-- <qiyezz-right v-if="curIndex == 1" />
                    <cxdw-right v-if="curIndex == 2" /> -->
                </div>
            </div>
        </div>
        <com-foot></com-foot>
    </div>
</template>

<script>
import comHeard from "@/components/jsscom-heard";
import comFoot from "@/components/com-foot";
import gyComLeft from "@/components/gy-com-left";

import zgxzmRight from "./zgxzm-right";
import cxdwRight from "./cxdw-right";
export default {
    components: {
        comHeard,
        comFoot,
        zgxzmRight,
        gyComLeft,
        cxdwRight,
    },
    data() {
        return {
            curIndex: 0,
            leftTitle1: "",
            leftTitle: "企业资质",
            navList: [],
            user: {},
            param: {},
        };
    },
    created() {
        this.prefixUrl = this.$store.state.user.imgUrl;
        this.user = this.$store.getters.user;
        this.curIndex = parseInt(this.$route.query.type) || 0;
        this.getQyzzMenu();
    },
    mounted() {},
    methods: {
        async getQyzzMenu() {
            const res = await this.$store.dispatch("news/getQyzzMenu");
            console.log(res);
            // const data = {
            //     menuType: 2,
            // };
            // const res1 = await this.$store.dispatch("news/getSsglMenu", data);

            this.navList = [...res];
            this.param = this.navList[this.curIndex];
            this.leftTitle1 = this.param.title;
        },
        onLeftTab(index) {
            this.curIndex = index;
            this.param = this.navList[index];
            this.leftTitle1 = this.param.title;
        },
    },
};
</script>

<style scoped>
@import "./zizhisq.css";
</style>
